<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/9/10 0010
 * Time: 11:27
 */

namespace App\Http\Controllers\Task;


use App\Http\Controllers\Controller;

class TestController extends Controller
{
    public function test(){
        $task = new \App\Jobs\IndexTask('测试异步任务');
        $success = \Hhxsv5\LaravelS\Swoole\Task\Task::deliver($task);  // 异步投递任务，触发调用任务类的 handle 方法
        var_dump($success);
    }
}